package com.app.base.adapter.holder;

import com.app.base.adapter.holder.BaseHolder;
import com.caszx.chargingpile.R;

import android.view.View;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;

public class FooterHolder extends BaseHolder<Object> {

	private ProgressBar loading_pb;
	private RelativeLayout mViewLoading;
	private TextView mViewError;
	private TextView mLoadingText;

	public FooterHolder(View view) {
		super(view);
	}

	@Override
	protected void initView() {
		mViewLoading = (RelativeLayout) mRootView
				.findViewById(R.id.viewLoading);
		mViewError = (TextView) mRootView.findViewById(R.id.viewText);
		mLoadingText = (TextView) mRootView.findViewById(R.id.loading_txt);
		loading_pb = (ProgressBar) mRootView.findViewById(R.id.loading_pb);
	}

	public TextView getLoadingText() {
		loading_pb.setVisibility(View.GONE);
		return mLoadingText;
	}

	public void showErrorView() {
		mViewError.setVisibility(View.VISIBLE);
		mViewLoading.setVisibility(View.GONE);
	}

	public void showLoadingView() {
		mViewLoading.setVisibility(View.VISIBLE);
		mViewError.setVisibility(View.GONE);
	}

	@Override
	protected void refreshView() {

	}

}
